﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class StartPanel : BasePanel<StartPanel>
{
    public CustomGUIButton btnEnter;
    public CustomGUIButton btnSetting;
    public CustomGUIButton btnQuit;
    public CustomGUIButton btnRank;

    public Texture2D cursorTex;

    void Start()
    {
        btnEnter.clickEvent += () =>
        {
            Hide();
            NamePanel.Instance.Show();
        };
        btnSetting.clickEvent += () =>
        {
            Hide();
            SettingPanel.Instance.Show();
        };
        btnQuit.clickEvent += () =>
        {
#if UNITY_EDITOR
            //编辑器模式
            UnityEditor.EditorApplication.isPlaying = false;
#else       
            //真机模式
            Application.Quit();
#endif
        };
        btnRank.clickEvent += () =>
        {
            Hide();
            RankPanel.Instance.Show();
        };
    }
}
